package 力扣._674最长连续递增序列;

public class Solution {
    public int findLengthOfLCIS(int[] nums) {
        //dp[i]: 以nums[i]结尾的最长递增子序列大小
        int max = 0;
        int[] dp = new int[nums.length];
        dp[0] = 1;
        for (int i = 1; i < nums.length; i++) {
            dp[i] = 1;
            if (nums[i] > nums[i - 1])
                dp[i] += dp[i - 1];
            max = Math.max(max,dp[i]);
        }
        return max;
    }
}
